2.2. Database Failover Process
When a highly available mailbox database failure occurs the PAM will attempt to perform a failover of the database. Before attempting to select a suitable copy to activate the attempt copy last logs (ACLL)
process occurs. ACLL makes remote procedure calls (RPCs) to each DAG
node that hosts a copy of the mailbox database that is being activated.
This call requests to see whether the servers are available and healthy
and determines the LogInspectorGeneration
value for the database copy. The last active mailbox database copy is
used to copy any missing log files to the copy selected by Active Manager for activation. If the ACLL process fails to retrieve all of the missing log files, the configured AutoDatabaseMountDial value is consulted. The AutoDatabaseMountDial value has the following three potential values:
BestAvailability
This value allows the database to be automatically mounted if the copy
queue length is less than or equal to 12. The copy queue length is the
number of logs that the passive copies recognize and have not been
replicated. When the copy queue length is less than or equal to 12,
Exchange Server attempts to replicate the remaining logs to the passive
copies and mount the database. This is the default value.
GoodAvailability
This value allows the database be automatically mounted immediately
after a failover if the copy queue length is less than or equal to six.
When the copy queue length is less than or equal to six, Exchange
Server attempts to replicate the remaining logs to the passive copy and
mount the database.
Lossless
This value does not allow a database to mount automatically until all
logs generated on the active copy have been copied to the passive copy.
If the number of lost logs is within the configured AutoDatabaseMountDial value, Exchange Server mounts the database. If the number of lost logs falls outside the configured AutoDatabaseMountDial
value, Exchange Server does not mount the database until either missing
log files are recovered or an administrator manually mounts the
database and accepts that the loss of data is larger than the AutoDatabaseMountDial setting. You use the Set-MailboxServer cmdlet to configure the AutoDatabaseMountDial setting for each DAG node.
It may seem
counterintuitive to list the Best Availability as allowing for 12
missing transaction logs, and Good Availability as only allowing 6. In
this case, availability is referring to the database being mounted and
available, not to the possibility of lost data. In most enterprise
environments, data loss is less acceptable than the loss of service.
You must decide whether to keep the database available by allowing it
to mount despite potential data loss or to leave it unavailable and
wait for manual recovery of missing log files.
2.3. Mailbox Database Activation
When an active database
failure occurs, Active Manager uses a set of selection criteria to
determine which copy should be activated. It would make sense that
Active Manager attempts to locate the best database copy to perform the
quickest failover that is least likely to lose data. Active Manager
uses a complex sorting system to determine which copy to make active.
When a failover occurs, Active
Manager uses several sets of selection criteria to determine which
database copy to activate. During the process for selecting the best
copy to activate, Active Manager will:
Enumerate all the available copies.
Remove any copies on unreachable servers.
Sort available copies by how up to date they are.
Use the activation preference if a tiebreaker is necessary.
For more information on selection process see "Understanding Active Manager" at http://technet.microsoft.com/en-us/library/dd776123.aspx.
Exchange 2010 SP1 provides the RedistributeActiveDatabases.ps1 script that provides thee ways to balance active database copies. The first option, switch parameter -BalanceDbsByActivationPreference, just activates the copy that has the lowest ActivationPreference value without taking into account Active Directory site balance. The second option, switch parameter –BalanceDbsIgnoringActivationPreference, attempts to balance active copies across the DAG, as shown in Figure 6. The third option, -BalanceDbsBySiteAndActivationPreference,
attempts to keep active databases balanced between Active Directory
sites. The version of the script included in SP1 won't move databases
to less preferred copies to achieve site balance, but it will log a
warning. The script will attempt to minimize an active copy imbalance
during the redistribution process; this will help prevent a single node
from being overwhelmed with active copies during this process.